import { BaseEntity, Column, Entity, PrimaryGeneratedColumn } from 'typeorm';
import type {
  IsLoveTypes,
  FoodType,
} from '../admin/foodManager/food.interface';

/**
 * @description: 食物管理表
 */

@Entity()
export class TFood extends BaseEntity {
  @PrimaryGeneratedColumn()
  id: number;

  @Column({ type: 'varchar', name: 'name' })
  name: string;

  @Column({ type: 'varchar', name: 'love_type' })
  loveType: IsLoveTypes;

  @Column({ type: 'varchar', name: 'food_type' })
  foodType: FoodType;

  @Column({ type: 'varchar', name: 'description' })
  description: string;

  @Column({ type: 'varchar', name: 'created_at' })
  createdAt: string;

  @Column({ type: 'varchar', name: 'updated_at' })
  updatedAt: string;
}
